package test_11_23;

public class test11_23_5 {
    public static int max(int x1,int x2)
    {
        return x1>x2?x1:x2;
    }
    public static int max(int x1,int x2,int x3)
    {
        if(x1>x2&&x1>x3)
            return x1;
        else if(x2>x3&&x2>x1)
            return x2;
        else
            return x3;
    }

    public static void main(String[] args) {
        int max1 = max(3,8);
        int max2 = max(2,6,19);
        System.out.println("两个数的最大数是："+max1);
        System.out.println("三个数的最大数是："+max2);

    }
}
